PREFIX=/share/calatisiad-project/calatisiad-linux/output
CC = gcc

calatisiad : libcal-character.o
	$(CC) -shared -Wl,-soname,libcal-character.so -o libcal-character.so libcal-character.o `pkg-config glib-2.0 sqlite3-wrapper --cflags --libs`
	mv ./libcal-character.so ${PREFIX}/usr/lib 
	rm ./libcal-character.o
	cp ./include/libcal-character.h ${PREFIX}/usr/include
	cp ./cal-character.pc ${PREFIX}/usr/lib/pkgconfig
libcal-character.o : libcal-character.c
	$(CC) -c libcal-character.c `pkg-config glib-2.0 sqlite3-wrapper --cflags --libs`
clean :
	rm ./*.o
	rm ${PREFIX}/usr/include/libcal-character.h
	rm ${PREFIX}/usr/lib/libcal-character.so 
	rm ${PREFIX}/usr/lib/pkgconfig/cal-character.pc
